-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve text inside code fences #14822
Conversation
@bondydaa @mananjadhav One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Please make sure you fill out the checklist as well and test / screenshot for all devices.
@marktoman Quick bump on @bondydaa's comment to fill out the checklist and update the screenshots for all platforms. |
On iOS, when entering:
the converted result ( Editing works as expected: But, it is rendered like this: So I'm not sure if I should try to change how it is rendered somehow. |
Hmm that's strange, it only happens on iOS (native or mWeb?) that it's still rendered with the extra new line? |
Only native, Safari works the same as desktop. I'll dig into the rendering. |
Apparently, the HTML standard renders the lines the way we settled on (the web/desktop videos), but this behavior is behind a flag on native:
I've tested it by adding |
Hmm the other half of that recommendation is slightly concerning
but I think you're right that's what we want to provide consistent behavior across all platforms. Go ahead and commit that change then and we can go from there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 though package*.json conflicts hopefully they're not too bad
I've merged new changes and tested it everywhere, and it works as expected. |
Just checking if I haven't accidentally removed something in the issue description, the PR reviewer checklist will be added by a reviewer, correct? |
Reviewer Checklist
Screenshots/VideosWebweb-code-fence-trailing-new-line.movMobile Web - Chromemweb-chrome-code-fence-trailing-new-line.movMobile Web - Safarimweb-safari-code-fence-trailing-new-line.movDesktopdesktop-code-fence-trailing-new-line.moviOSios-code-fence-trailing-new-line.movAndroidandroid-code-fence-trailing-new-line.mov |
Thanks for the PR and the thorough updates @marktoman. I've reviewed the PR and completed the checklist. All good here @bondydaa. |
Can somebody please explain the process? Does this wait for somebody to assign an internal engineer? |
sorry was OOO on Friday, taking a look. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.2.75-0 🚀
|
🚀 Deployed to production by https://github.com/melvin-bot[bot] in version: 1.2.75-0 🚀
|
Details
Pulls in changes from updated Expensimark code on Expensify/expensify-common#496. This makes it so that we preserve text within code fences instead of stripping out extra new lines at the bottom. This is because we feel it makes more sense to preserve what a user has entered vs trying to be "helpful" and remove text they may or may not have wanted.
Fixed Issues
$ #14694
$ #14694 (comment)
Tests
Steps (validation + regressions)
text
once added.text
:Offline tests
QA Steps
Steps (validation + regressions)
text
once added.text
:PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
mac-chrome.mov
mac-safari.mov
Mobile Web - Chrome
android-chrome.mp4
Mobile Web - Safari
ios-safari.mov
Desktop
desktop.mov
iOS
ios-native.mov
Android
android-native.mp4